<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/18 0018
 * Time: 下午 1:49
 */
use yii\helpers\Url;
?>
<?php $this->beginBlock("content");?>
<div class="row">
    <div class="col-md-12 white-box">
        <form action="<?=Url::to(["set-plugs"])?>" method="post" rel-action="form" >
            <div class="row">
                <div class="form-group">
                    <label class="col-md-12 form-control-label" for="">插件列表：</label>
                    <div class="col-md-12 checkbox checkbox-success">
                        <?php foreach ($plugs as $key => $item): ?>
                            <input id="checkbox<?=$item['id']?>" name="plugs_id[]" type="checkbox" value="<?=$item['id']?>" <?php if (@$agentPlugs && in_array($item['id'], $agentPlugs)) : ?>checked<?php endif ?>>
                            <label for="checkbox<?=$item['id']?>"> <?=$item['name']?>【<?=$item["id"]?>】 </label>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <?php endforeach ?>
                        <div class="form-control-feedback" rel-mark="plugs_id"></div>
                    </div>
                </div>
            </div>
            <input type="hidden" name="agent_uid" value="<?=$agent_id?>">
            <button type="submit" class="btn btn-success waves-effect waves-light m-r-10 float-left">
                确认保存
            </button>
        </form>
    </div>

</div>
<?php $this->endBlock();?>
